package com.hbnu.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hbnu.system.core.base.CommonPage;
import com.hbnu.system.model.dto.CheckBackDTO;
import com.hbnu.system.model.dto.PorProjectTSdto;
import com.hbnu.system.model.dto.Porproject_registrationDTO;
import com.hbnu.system.model.entity.Porproject_registration;
import com.hbnu.system.model.query.PorProjectExportQuery;
import com.hbnu.system.model.query.PorProjectPageQuery;
import com.hbnu.system.model.vo.ExportPorProjectVO;

import java.io.IOException;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author ${author}
 * @since 2023-05-16
 */
public interface IPorproject_registrationService extends IService<Porproject_registration> {
    /**
     * 新增纵向项目
     *
     * @param porProjectRegistrationDTO
     * @return 是否成功
     */
    boolean addPorproject(Porproject_registrationDTO porProjectRegistrationDTO);

    /**
     * 删除纵向项目
     *
     */
    boolean deletePorproject(String porregistrationID) throws IOException;

    /**
     * 修改纵向项目
     *
     */
    boolean updatePorproject(Porproject_registrationDTO porProjectRegistrationDTO);



    /**
     * 根据主键查询纵向项目
     *
     */
    Porproject_registration getPorproject(String porprojectID);

    /**
     * 根据主键查询纵向项目DTO
     * @param porprojectID
     * @return
     */
    Porproject_registrationDTO getPorprojectDTOById(String porprojectID);



    /**
     * 提交纵向项目在研申请
     *
     */
    Boolean CommitPorproject(String porprojectID);

    /**
     * 在研院级审核通过
     */
    Boolean collegeCheckPass(String token,String porProjectID);

    /**
     * 在研院级审核打回
     */
    Boolean collegeCheckBack(String token,CheckBackDTO checkBackDTO);

    /**
     * 纵向在研校级审核通过
     */
    Boolean schoolCheckPass(String token,String porProjectID);

    /**
     * 纵向在研校级审核打回
     */
    Boolean schoolCheckBack(String token,CheckBackDTO checkBackDTO);

    /**
     * 提交纵向项目结题申请
     *
     */
    Boolean CommitPorprojectFinish(String porProjectID);

    /**
     * 院级结题审核通过
     */
    Boolean collegeFinishCheckPass(String token,String porprojectID);

    /**
     * 院级结题审核打回
     */
    Boolean collegeFinishCheckBack(String token,CheckBackDTO checkBackDTO);

    /**
     * 纵向校级结题审核通过
     */
    Boolean schoolFinishCheckPass(String token,String porprojectID);

    /**
     * 纵向校级结题审核打回
     */
    Boolean schoolFinishCheckBack(String token,CheckBackDTO checkBackDTO);



    /**
     * 分页普通用户得到自身相关纵向项目
     * @param porProjectPageQuery
     * @return
     */
    CommonPage<Porproject_registration> userGetProjects(PorProjectPageQuery porProjectPageQuery);

    /**
     * 纵向项目导出
     * @param porProjectPageQuery 查询条件
     * @return 导出数据
     */
    CommonPage<Porproject_registration> export(PorProjectPageQuery porProjectPageQuery);

    /**
     * 纵向项目
     * @param porProjectExportQuery
     * @return
     */
    List<ExportPorProjectVO> exportPorProject(PorProjectExportQuery porProjectExportQuery);
    /**
     * 暂存纵向项目数据
     * @param porProjectTSdto 项目暂存数据
     * @return 是否暂存成功
     */
    boolean saveDraftProject(PorProjectTSdto porProjectTSdto);
    /**
     * 在研项目撤回
     */
    Boolean withdrawZXProject(String token, String porProjectID);

}
